package com.shun.common.page;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.io.Serializable;

/**
 * 分页基础类
 * @author clever
 * @since 2021-09-28
 */
public class ShunPage<T> implements Serializable {

    /**
     * 起始页面
     */
    public  int page;

    /**
     * 页面条数
     */
    public int limit;

    public void setPage(int page) {
        this.page = page;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public int getPage() {
        return page;
    }

    public int getLimit() {
        return limit;
    }

    /**
     *
     * @return
     */
    public Page toPage(){
        return new Page(this.page,this.limit);
    }

    @Override
    public String toString() {
        return "ShunPage{" +
                "page=" + page +
                ", limit=" + limit +
                '}';
    }
}
